package demo4.controller;
import demo4.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class UserController {
    @Autowired
    private IUserService userService;
    public void doLogin(){
        System.out.println("UserController:收到来自用户希望进行登录的请求");
        System.out.println("UserController:获取用户提交上来的用户名和密码");
        System.out.println("UserController:开始处理用户登录");
        boolean success=userService.login("admin", "123456");
        if (success){
            System.out.println("UserController:向用户展示用户登录成功页面");
        }else{
            System.out.println("UserController:向用户展示用户登录失败页面");
        }
    }
}
